<template>
  <div class="Anti-shaking-throttling">
    <el-button type="primary" v-debounce.foo.bar="[sayHello, `click`, 300]" size="mini"
      >不停重点只执行1次</el-button
    >
    <br />
    <br />
    <!-- <el-button type="primary" v-throttling size="mini" @click="sayHello">节流</el-button> -->
    <br />
    <br />
    防抖
    <!-- <el-input v-debounce="[input, `input`, 600]" v-model="inputvalue"></el-input> -->
    <br />
  </div>
</template>

<script>
export default {
  name: 'Anti-shaking-throttling',
  components: {},
  props: {},
  data() {
    return {
      inputvalue: '',
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    sayHello() {
      console.log('按钮');
    },
    input(value) {
      console.log(this.inputvalue);
    },
  },
};
</script>

<style scoped>
/* 子代选择器 */
.box > span {
  color: aqua;
}
/* 后代选择器 */
.box span {
  background-color: rgb(118, 76, 76);
}
</style>
